import {Entity, PrimaryGeneratedColumn, Column, ManyToOne, BaseEntity} from 'typeorm';
import { Role } from './role.entity';

@Entity()
export class User extends BaseEntity {
    @PrimaryGeneratedColumn()
    id: number;

    @Column()
    account: string;

    @Column()
    password: string;

    @Column()
    phone: string;

    @Column()
    mail: string;

    @Column()
    avatar: string;

    @Column()
    nickname: string;

    @Column()
    age: number;

    @Column()
    gender: number;

    @ManyToOne(() => Role)
    role: Role;
}
